var Template = "/web/template/";
var routeApp = angular.module('routeApp', ['ngRoute']);
routeApp.config(['$routeProvider', '$locationProvider', function ($routeProvider) {//
    $routeProvider
    .when('/example1', {
        templateUrl: Template + 'example1.html',
        controller: 'example1'
    }).when('/example2', {
        templateUrl: Template + 'example2.html',
        controller: 'example2'
    }).when('/example2_1/:yonghuid', {
        templateUrl: Template + 'example2_1.html',
        controller: 'example2_1'
    }).when('/example3', {
        templateUrl: Template + 'example3.html',
        controller: 'example3'
    }).when('/example4', {
        templateUrl: Template + 'example4.html',
        controller: 'example4'
    }).when('/example5', {
        templateUrl: Template + 'example5.html',
        controller: 'example5'
    }).when('/example6', {
        templateUrl: Template + 'example6.html',
        controller: 'example6'
    }).when('/example7', {
        templateUrl: Template + 'example7.html',
        controller: 'example7'
    }).when('/example8', {
        templateUrl: Template + 'example8.html',
        controller: 'example8'
    }).otherwise({
        title: '其他',
        redirectTo: "/no_login"
    });
}]).run(["$location", "$rootScope", function (e, t) {
    
}]);

var APP = routeApp;

routeApp.controller('appCtrl', ["$scope", "$rootScope",  function (scope, rootScope) {
    //$rootScope.$on("title", function (event, data) {
    //    if ($rootScope.title = data, checker.isApple()) var n = $("body"), o = $('<iframe src="/mobile/images/dot.png"></iframe>').on("load", function () {
    //        setTimeout(function () {
    //            o.off("load").remove()
    //        }, 0)
    //    }).appendTo(n);
    //})

    
}]);

APP.controller('main', ["$http", "$scope", "$location", "$rootScope",function (http, scope, location, rootScope) {
    $scope.go = function (url) {
        alert(url);
        location.path(url);
    }
}]);

APP.controller('form', ["$http", "$scope", "$location", "$rootScope", function (http, scope, location, rootScope) {

    //var t = (location.search()["formurl"]);

    //http.get("wanshanziliao").success(function (response) { scope.user = response.list[0]; scope.user.renwuid = location.search()["renwuid"]; });
    

    //scope.save = function () {
    //    http.post('wanshanziliaosave', scope.user)
    //    .success(function (data) {
    //        if (data.obj > 0) {
                
    //        }
    //        if (data.code == 200) {
    //            location.search({});
    //            location.path(t).replace();

    //        } else {
    //            alert(data.msg);
    //        }
    //    });
    //}
}]);

APP.controller('list', ["$http", "$scope", "$location", "$rootScope", function (http, scope, location, rootScope) {

}]);

